home *** CD-ROM | disk | FTP | other *** search
- /* =================
- * PedApplication.hh
- * =================
- *
- * Implemented by PedApplication.cc
- */
-
- #pragma once
-
- #include <Events.h>
-
- #include "NGLList.hh"
-
- #include "AEAModelRoot.hh"
- //#include "AEAModelName.hh"
-
- #include "PedTask.hh"
- #include "PedModelApplication.hh"
- #include "PedMenuBar.hh"
- #include "PedAgentAboutBox.hh"
- #include "PedCommandAbout.hh"
- #include "PedCommandNew.hh"
- #include "PedCommandOpen.hh"
- #include "PedCommandClose.hh"
- #include "PedCommandQuit.hh"
- //#include "PedCommandUndo.hh"
- #include "PedCommandCut.hh"
- #include "PedCommandCopy.hh"
- #include "PedCommandPaste.hh"
- #include "PedCommandClear.hh"
- //#include "PedCommandSelectAll.hh"
-
- class Ped1AppProcess;
-
- class PedApplication : public PedTask {
- public:
- // Constructor & destructor.
- PedApplication();
- virtual ~PedApplication();
-
- // OSL stuff.
- //virtual DescType Class() const {return cApplication;}
- //virtual void GetProperty(DescType inDesiredClass, DescType inPropertyID, AEAModel *&outObject) const;
- //virtual void CreateObject(DescType inNewClass) {}
-
- // Event processing
- virtual void DispatchNullEvent(EventRecord &inEvent);
- virtual void DispatchEvent(EventRecord &inEvent);
-
- // Control
- virtual void PreInit(); // What must before console init.
- virtual void Run(); // This calls the main event loop.
-
- // Event responding
- virtual void NotifyOpenAppEvent(); // Respond to an Open Application event.
- virtual void NotifyOpenDocEvent(); // Respond to an Open Documents event.
- virtual void NotifyPrintDocEvent(); // Respond to a Print Documents event.
- virtual void NotifyQuitEvent(); // Respond to a Quit event.
-
- virtual void DoAbout(); // Respond to 'show about box'.
-
- protected:
- virtual void InstallAECallbacks(AEAModelRoot &inAppModel);
- virtual void InstallMenuCommands();
- virtual void MyPreInit();
- virtual void Initialize();
-
- // Event processing routines.
- virtual void DispatchHighLevelEvent(EventRecord &inEvent);
- virtual void DispatchMouseDown(EventRecord &inEvent);
- virtual void DispatchKey(EventRecord &inEvent);
- virtual void DispatchActivate(EventRecord &inEvent);
- virtual void DispatchUpdate(EventRecord &inEvent);
- virtual void DispatchDiskInsert(EventRecord &inEvent);
-
- virtual void EventLoop(); // This is the main event loop.
-
- protected:
- Ped1AppProcess &mProcess;
- PedModelApplication mModel;
- //AEAModelName *mName;
- PedMenuBar mMenuBar;
- PedCommandAbout mAboutCmd;
- PedCommandNew mNewCmd;
- PedCommandOpen mOpenCmd;
- PedCommandClose mCloseCmd;
- PedCommandQuit mQuitCmd;
- //PedCommandUndo mUndoCmd;
- PedCommandCut mCutCmd;
- PedCommandCopy mCopyCmd;
- PedCommandPaste mPasteCmd;
- PedCommandClear mClearCmd;
- //PedCommandSelectAll mSelectAllCmd;
- bool mPreInitDone;
- bool mOpenAppReceived;
- bool mOpenDocReceived;
- bool mQuitReceived;
- PedAgentAboutBox mAboutBox;
- };
-